package eu.dominicum.ft.pd;

import eu.dominicum.ft.pd.mao.MakeStageResultDetailMAO;

/**
 * Stage result detail.
 *
 * @author Harry Klerks
 * @2013M1
 */
public class StageResultDetail extends PersistentDomainObject {

    /**
     * Rank.
     */
    private Integer rank;

    /**
     * Points.
     */
    private Integer points;

    /**
     * Associated team member.
     */
    private TeamMember teamMember;

    /**
     * Associated stage result.
     */
    private StageResult stageResult;

    /**
     * Make a StageResultDetail object.
     *
     * @param makeStageResultDetailMAO -
     * @return StageResultDetail
     */
    protected static StageResultDetail make(
            final MakeStageResultDetailMAO makeStageResultDetailMAO) {

        StageResultDetail newStageResultDetail = new StageResultDetail();

        newStageResultDetail.rank = makeStageResultDetailMAO.getRank();
        newStageResultDetail.points = makeStageResultDetailMAO.getPoints();
        newStageResultDetail.stageResult =
                makeStageResultDetailMAO.getStageResult();
        newStageResultDetail.teamMember =
                makeStageResultDetailMAO.getTeamMember();

        return newStageResultDetail;
    }

    /**
     * Protected constructor to satisfy JPA based object stores.
     */
    protected StageResultDetail() {

    }

    /**
     * .
     *
     * @return Integer
     */
    public final Integer getRank() {
        return rank;
    }

    /**
     * .
     *
     * @return Integer
     */
    public final Integer getPoints() {
        return points;
    }

    /**
     * .
     *
     * @return TeamMember
     */
    public final TeamMember getTeamMember() {
        return teamMember;
    }

    /**
     * .
     *
     * @return StageResult
     */
    public final StageResult getStageResult() {
        return stageResult;
    }
}
